import request from "@/utils/request";

export function addAdvertisment(data) {
  return request({
    url: "/api/ad/add",
    method: "post",
    data,
  });
}

export function updateAd(data) {
  return request({
    url: "/api/ad/update",
    method: "post",
    data,
  });
}

export function reqAdInfo(pageNo,pageSize){
  return request({
    url:`/api/ad/info?pageNo=${pageNo}&pageSize=${pageSize}`,
    method:"get"
  })
}

export function delAd(data) {
  return request({
    url: `/api/ad/remove`,
    method: "post",
    data
  });
}

export function delBatchAd(data) {
  return request({
    url: "/api/ad/delBatch",
    method: "post",
    data,
  });
}

export function handleAd(data) {
  return request({
    url: "/api/ad/handle",
    method: "post",
    data,
  });
}